The present invention relates to communication between an application and non-networked input/output (I/O) devices and, more particularly, to a method and system for emulating socket application programming interface (API) calls to facilitate communication between an application executing on a computing device and non-networked I/O devices that are connected directly to the computing device.
Applications executing on computing devices use application programming interface (API) calls to communicate with other entities. API calls are handled using a variety of transport mechanisms depending on the destination entity. An API call destined to an application on a networked I/O device reachable by the computing device hosting the source application may be a socket API call handled using an IP-aware transport mechanism (e.g. TCP/IP packet), whereas an API call destined to a non-networked I/O device connected directly to the computing device hosting the source application, such as a RS-232 (COM), Universal Serial Bus (USB), Institute of Electrical and Electronics Engineers (IEEE) Std. 1284 (Parallel Port) and/or IEEE Std. 1394 (FireWire) I/O device, may be handled using an IP-unaware transport mechanism supported by the non-networked I/O device.
Because of differences among transport mechanisms, application developers have conventionally had to develop and maintain separate code and documentation for each type of entity with which an application is expected to communicate. This requirement of separate coding and documentation has increased the amount of time and money spent on software development and increased code complexity.